<%--
  Created by IntelliJ IDEA.
  User: zhuangjianhui_91
  Date: 2015/10/22
  Time: 1:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.io.*,java.util.Locale" pageEncoding="utf-8" %>
<%@ page import="javax.servlet.*,javax.servlet.http.* " %>
<%
    //获取客户端本地化信息
    Locale locale = request.getLocale();
    String language = locale.getLanguage();
    String country = locale.getCountry();
%>
<html>
<head>
    <title>Detecting Locale</title>
</head>
<body>
<center>
    <h1>Detecting Locale 这个例子告诉我们如何在JSP中显示语言和国家</h1>
</center>
<p align="center">
    <%
        out.println("Language : " + language + "<br />");
        out.println("Country  : " + country + "<br />");
    %>
</p>
</body>
</html>
